package com.zy.design.state.common;

/**
 * @author zhaoyi
 * @date 2021/9/23 13:11
 */
public class CapeMario implements IMario {

    private CapeMario() {
    }

    private static final CapeMario instance = new CapeMario();

    public static CapeMario getInstance() {
        return instance;
    }


    @Override
    public void eatMustRoom(MStateMachine machine) {
        System.out.println("什么也不做 ");
    }

    @Override
    public void eatCape(MStateMachine machine) {
        System.out.println("什么也不做 ");
    }

    @Override
    public void eatFire(MStateMachine machine) {
        machine.setMario(FireMario.getInstance());
        machine.setScore(machine.getScore()+300);

    }

    @Override
    public void monster(MStateMachine machine) {
        machine.setMario(SmallMario.getInstance());
        machine.setScore(machine.getScore()-200);
    }

    @Override
    public String getStatus() {
        return "斗篷玛丽奥";
    }
}
